import rcsj_model_analysis
from rcsj_model_analysis import simulating_data
from rcsj_model_analysis import io
from rcsj_model_analysis import inference222
from rcsj_model_analysis import model

import numpy as np
from scipy import stats
from scipy import constants
import scipy.io as spio
from scipy.integrate import quad, simps, cumtrapz
import pymc as pm
import pytensor.tensor as pt
from unittest import TestCase

h_bar = constants.hbar
k_B = constants.Boltzmann
elementary_charge = constants.elementary_charge

class TestModel(TestCase):
    def test_import(self):
        test_string = "Successful import!"
        assert model.import_package_test() == test_string
    def test_model_creation(self):
        data = np.zeros((2,2)) # empty array
        upper_prior = 1 # upper prior for critical current
        f_j0 = 5 # plasma frequency
        Temp = 3 # temperature
        assert type(model.rcsj_model1(data, upper_prior,f_j0,Temp)) == pm.Model

if __name__ == '__main__':
    unittest.main()